package com.zc.service.lightbox;

import com.zc.dao.ImageMapper;
import com.zc.entity.Image;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class LightboxServer {
    @Resource
    private ImageMapper dao;
    public void save(Image img)throws Exception {
        dao.save(img);
    }

    public List<Image> findAll(int state) {
        Map<String,Object> params = new HashMap<>();
        params.put("state",state);
        return dao.findAll(params);
    }
}
